
import cv2

import numpy as np

import random #�����ģ��

img=cv2.imread('images/a.jpg') #��ȡͼ��

#print img.shape
#ʵ��ѩ��Ч��
for num in range(0,10000): #����ѩ�������
    i = random.randint(0,img.shape[0])%img.shape[0]
    j = random.randint(0,img.shape[1])%img.shape[1]
    #img[i,j] = [0, 0, 255]
    cv2.circle(img,(j,i),2,(0,0,255),-1)

cv2.imshow('src',img)

cv2.imwrite('snow.jpg',img)

cv2.waitKey(0)
  
cv2.destroyAllWindows()
 
